/*
 * Copyright (c) 2006-2021, Ulandlink Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2021-09-18     zlt         first version
 */
 
#include <rtthread.h>
#include <app_charge_sm.h>
#if defined(EVC30_NA)
#include <app_cse7761_drv.h>
#elif defined(EVC30_EU)
#include "app_rn8302b_drv.h"
#endif


#ifndef LOG_TAG
#define LOG_TAG                    "charge.task"
#endif
#undef LOG_LVL
#define LOG_LVL                    	LOG_LVL_INFO
#include "ulog.h"

int32_t app_charge_task(void)
{
#if defined(EVC30_NA)
	if(!drv_cse7761_init()){
		LOG_E("drv_cse7761_init err");
		return -1;
	}
#endif
#if defined(EVC30_EU)
	if(app_meter_init()){
		LOG_E("app_meter_init(err)");
		return -1;
	}
#endif
	return 0;
}

INIT_APP_EXPORT(app_charge_task);